<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.ArrayList,java.util.List" %>
<%@ page import="ppl.People" %>
<%@ page import="java.util.List" %>


<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>

<table border="1">
    <tr>
        <td>员工ID</td>
        <td>员工姓名</td>
        <td>员工性别</td>
        <td>员工年龄</td>
        <td>所属部门</td>
        <td>所在职务</td>
        <td>工龄</td>
        <td>修改操作</td>
        <td>删除操作</td>
    </tr>
    <%
        Object o=request.getAttribute("list");
        List<People> list=(List<People>) o;
    %>
    <%  for (People people : list) {%>
    <tr>
        <td><%=people.getId()%></td>
        <td><%=people.getName()%></td>
        <td><%=people.getSex()%></td>
        <td><%=people.getAge()%></td>
        <td><%=people.getDapartment()%></td>
        <td><%=people.getType()%></td>
        <td><%=people.getYear()%></td>

        <td><a href="test3/edit.jsp?id=<%=people.getId()%>&name=<%=people.getName()%>&sex=<%=people.getSex()%>&age=<%=people.getAge()%>&dapartment=<%=people.getDapartment()%>&type=<%=people.getType()%>&year=<%=people.getYear()%>">修改</a></td>
        <td><a href="demo3.Servlet.deleteServlet?id=<%=people.getId()%>">删除</a></td>

    </tr>
    <% }%>

    <tr>
        <a href="test3/add.jsp">新增数据</a>
    </tr>




</table>



</body>
</html>